#ifndef __Z_DRIVER_EX_POWER_H
#define __Z_DRIVER_EX_POWER_H

typedef int (*expwrctrl_api_get)(const struct device *dev);
typedef int (*expwrctrl_api_set)(const struct device *dev, int s);

struct expwrctrl_driver_api {
    expwrctrl_api_set set;
    expwrctrl_api_get get;
};

static inline int expwrctrl_get(const struct device *dev)
{
    const struct expwrctrl_driver_api *api = (const struct expwrctrl_driver_api *)dev->api;
    return api->get(dev);
}

static inline int expwrctrl_set(const struct device *dev, int s)
{
    const struct expwrctrl_driver_api *api = (const struct expwrctrl_driver_api *)dev->api;
    return api->set(dev, s);
}

#endif /* __Z_DRIVER_EX_POWER_H */
